package com.designPattern.command;

import com.designPattern.command.command.OffCommand;
import com.designPattern.command.command.OnCommand;
import com.designPattern.command.controller.RemoteController;
import com.designPattern.command.receiver.LightReceiver;

public class Test {
    public static void main(String[] args) {
        LightReceiver lightReceiver = new LightReceiver();
        RemoteController remoteController = new RemoteController();
        remoteController.setCommand(1,new OnCommand(lightReceiver),new OffCommand(lightReceiver));
        remoteController.on(1);
        remoteController.off(1);
        remoteController.undo();
        remoteController.undo();
    }
}
